package org.rambadger.command.command;


import org.axonframework.commandhandling.annotation.TargetAggregateIdentifier;
import org.rambadger.command.validation.Unique;
import org.rambadger.command.validation.UrlIdentifier;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

//TODO: document

public class SetTrackAssignments {
    @TargetAggregateIdentifier
    private final String platformId;

    private final String trackId;
    private final List<String> assignments;

    public SetTrackAssignments(String platformId, String trackId, List<String> assignments) {
        this.platformId = platformId;
        this.trackId = trackId;
        this.assignments = assignments;
    }

    @UrlIdentifier @NotNull
    public String getPlatformId() {
        return platformId;
    }

    @UrlIdentifier @NotNull
    public String getTrackId() {
        return trackId;
    }

    @UrlIdentifier @Unique @NotNull @Size(max = 64)
    public List<String> getAssignments() {
        return assignments;
    }
}
